Command line utility :: Format of text script file
There is a new format of script file (*.wpt) you can use to process your image files. The script file is just a text file that can be created by any text editor (like notepad). Each string line of the file must be one of the following commands:
BCG(i1;r1;r2;p1) changes Brightness, contrast and gamma balance
i1 - brightness (integer from -100 to 100%)
r1 - contrast (real from 0.2 to 5.0)
r2 - gamma (real from 0.2 to 5.0)
For p1 = 1 the filter will applied on Y
For p1 = 2 the filter will applied on RGB
RGB(i1;i2;i3) changes Red, Breen and Blue balance
i1 - Red (integer from -100 to 100%)
i2 - Green (integer from -100 to 100%)
i3 - Blue (integer from -100 to 100%)
CMY(i1;i2;i3) changes Cyan, Magenta and Yellow balance
i1 - Cyan (integer from -100 to 100%)
i2 - Magenta (integer from -100 to 100%)
i3 - Yellow (integer from -100 to 100%)
YCbCr(i1;i2;i3) changes Y, Cb and Cr balance
i1 - Y (integer from -100 to 100%)
i2 - Cb (integer from -100 to 100%)
i3 - Cr (integer from -100 to 100%)
HLS(i1;i2;i3) changes Hue, Luminance and Saturation balance
i1 - Hue (integer from -100 to 100%)
i2 - Luminance (integer from -100 to 100%)
i3 - Saturation (integer from -100 to 100%)
HSV(i1;i2;i3) changes Hue, Saturation and Volume balance
i1 - Hue (integer from -100 to 100%)
i2 - Saturation (integer from -100 to 100%)
i3 - Volume (integer from -100 to 100%)
Smooth(r1;i1;p1) applies Smooth filter
r1 - Std. deviation (real from 0.4 to 1.3)
i1 - Strength (integer from 10 to 100%)
For p1 = 1 the filter will use Tent distribution shape
p1 = 2 the filter will use Rect distribution shape
p1 = 3 the filter will use Gaussian distribution shape
Blur(r1;i1) applies Blur filter
r1 - Readius (real from 0.5 to 2.5)
i1 - Strength (integer from 10 to 100%)
Sharpen(r1;i1;p1) applies Sharpen filter
r1 - Std. deviation (real from 0.4 to 1.3)
i1 - Strength (integer from 10 to 100%)
For p1 = 1 the filter will use Tent distribution shape
p1 = 2 the filter will use Rect distribution shape
p1 = 3 the filter will use Gaussian distribution shape
Detail(r1;i1;p1) applies Detail filter
r1 - Std. deviation (real from 0.4 to 1.3)
i1 - Strength (integer from 10 to 100%)
For p1 = 1 the filter will use Tent distribution shape
p1 = 2 the filter will use Rect distribution shape
p1 = 3 the filter will use Gaussian distribution shape
Remove_noise(i1;p1) Removes all groups of isolated pixels.
i1 - number of pixels
For p1 = 0 groups of black pixels will be removed
p1 = 1 groups of white pixels will be removed
Contour(r1;i1;p1;p2) applies Contour filter
r1 - Std. deviation (real from 0.4 to 1.3)
i1 - Strength (integer from 100 to 1000%)
For p1 = 1 the filter will use Tent distribution shape
p1 = 2 the filter will use Rect distribution shape
p1 = 3 the filter will use Gaussian distribution shape
For p2 = 1 the filter will use White background
p2 = 2 the filter will use Black background
Contour(r1;i1;p1;p2) applies Contour filter
r1 - Std. deviation (real from 0.4 to 1.3)
i1 - Strength (integer from 100 to 1000%)
For p1 = 1 the filter will use Tent distribution shape
p1 = 2 the filter will use Rect distribution shape
p1 = 3 the filter will use Gaussian distribution shape
Rotate(i1;p1;i2;i3;i4) Rotates an image
i1 - Angle (integer from 0 to 360)
i2 - Red component of background color (integer form 0 to 255)
i3 - Green component of background color (integer form 0 to 255)
i4 - Blue component of background color (integer form 0 to 255)
For p1 = 1 the an image will be rotated Clockwise
p1 = 1 the an image will be rotated Counter clockwise>
Rotate(i1;i2;i3) Rotates an image in automatic mode
i1 - Red component of background color (integer form 0 to 255)
i2 - Green component of background color (integer form 0 to 255)
i3 - Blue component of background color (integer form 0 to 255)
Mirror(p1) Mirrors an image
For p1 = 1 the an image will be mirrored Vertically
p1 = 1 the an image will be mirrored Horizontally
Crop(i1;i2;i3;i4) Crops an image from adges
i1 - Pixels from an image Top (integer)
i2 - Pixels from an image Bottom (integer)
i3 - Pixels from an image Left (integer)
i4 - Pixels from an image Right (integer)
Crop(i1;i2) Crops an image from center
i1 - Height (integer)
i2 - Width (integer)
Crop(i1) Crops an image in automatic mode
i1 - Tolerance (integer from 0 to 99)
Resize(i1;i2;p1) Resizes an image by Pixels
i1 - New Height of an image (integer)
i2 - New Width of an image (integer)
For p1 = 1 Height will be used to calculate new Width (keepping aspect)
p1 = 2 Width will be used to calculate new Height (keepping aspect)
p1 = 3 both Height and Width will be used to resize an image (without keepping aspect)
p1 = 4 both Height and Width will be used to resize an image (with keepping aspect)
p1 = 5 Height will be used to calculate new Width (keepping aspect, image will not be resized if new Height and Width are less than original)
p1 = 6 Width will be used to calculate new Height (keepping aspect, image will not be resized if new Height and Width are less than original)
p1 = 7 both Height and Width will be used to resize an image (without keepping aspect, image will not be resized if new Height and Width are less than original)
p1 = 8 both Height and Width will be used to resize an image (with keepping aspect, image will not be resized if new Height and Width are less than original)
Resize(i1;i2) Resizes an image by Percentage
i1 - Procent of current Height of an image (integer from 1 to 100%)
i2 - Procent of current Width of an image (integer from 1 to 100%)
Canvas_size(i1;i2;i3;i4;i5;i6) Change canvas size of an image
i1 - New Height of an image (integer)
i2 - New Width of an image (integer)
For i3 = 1 an image will be aligned to the left-top
i3 = 2 an image will be aligned at the center-top
i3 = 3 an image will be aligned at the right-top
i3 = 4 an image will be aligned at the center-left
i3 = 5 an image will be aligned at the center
i3 = 6 an image will be aligned at the center-right
i3 = 7 an image will be aligned at the left-bottom
i3 = 8 an image will be aligned at the center-bottom
i3 = 9 an image will be aligned at the right-bottom
i4 - Red component of canvas color (integer from 0 to 255)
i5 - Green component of canvas color (integer from 0 to 255)
i6 - Blue component of canvas color (integer from 0 to 255)
Watermark(s1;i1;i2;i3) Adds Watermark without transperency effect
s1 - Full path to watermark image file (string without quotation marks)
i1 - Percent horizontal position of left upper watermark image's corner (integer from 1 to 100%)
i2 - Percent vertical position of left upper watermark image's corner (integer from 1 to 100%)
i3 - Opacity percent of watermark image (integer from 1 to 100%)
Watermark(s1;i1;i2;i3;i4;i5;i6;i7) Adds Watermark with transperency effect
s1 - Full path to watermark image file (string without quotation marks)
i1 - Percent horizontal position of left upper watermark image's corner (integer from 1 to 100%)
i2 - Percent vertical position of left upper watermark image's corner (integer from 1 to 100%)
i3 - Opacity percent of watermark image (integer from 1 to 100%)
i4 - Red component of transparency color (integer form 0 to 255)
i5 - Green component of transparency color (integer form 0 to 255)
i6 - Blue component of transparency color (integer form 0 to 255)
i7 - Tolerance value for transparency color coincidence (integer from 0 to 100)
Text_watermark(s1;i1;i2;i3;s2;i4;i5;i6;i7;i8;i9;i10;i11;i12) Adds text watermark
s1 - Text string (without quotation marks)
i1 - Percent horizontal position of left upper watermark text's corner (integer from 1 to 100%)
i2 - Percent vertical position of left upper watermark text's corner (integer from 1 to 100%)
i3 - Opacity percent of watermark text (integer from 1 to 100%)
s2 - Name of font used to place text watermark (string without quotation marks)
i4 - Font size (integer from 1 to 100)
i5 - Red component of font color (integer form 0 to 255)
i6 - Green component of font color (integer form 0 to 255)
i7 - Blue component of font color (integer form 0 to 255)
i8 = 1 font will include the bold option, and = 0 otherwise
i9 = 1 font will include the italic option, and = 0 otherwise
i10 = 1 font will include the underline option, and = 0 otherwise
i11 = 1 font will include the strike option, and = 0 otherwise
i12 = 1 name of converted file will be used instead of s1 string, = 0 otherwise
Add_border(i1;i2;i3;i4;p1;i5;i6;i7;p2) Adds color border to an image
i1 - Border width (integer in pixels)
i2 - Red component of border color (integer from 0 to 255)
i3 - Green component of border color (integer from 0 to 255)
i4 - Blue component of border color (integer from 0 to 255)
i5 - Red component of background color (integer from 0 to 255)
i6 - Green component of background color (integer from 0 to 255)
i7 - Blue component of background color (integer from 0 to 255)
For p1 = 1 Border shape will be ellipse
p1 = 2 Border shape will be rectangle
For p2 = 1 Border will be placed inside an image
p2 = 2 Border will be placed outside an image
Add_shadow(i1;i2;i3;i4;i5;i6;i7;i8) Adds color shadow to an image
i1 - Shadow size (integer in pixels)
i2 - Distance to the shadow (integer in pixels)
i3 - Red component of shadow color (integer from 0 to 255)
i4 - Green component of shadow color (integer from 0 to 255)
i5 - Blue component of shadow color (integer from 0 to 255)
i6 - Red component of background color (integer from 0 to 255)
i7 - Green component of background color (integer from 0 to 255)
i8 - Blue component of background color (integer from 0 to 255)
Color_replace(i1;i2;i3;i4;i5;i6;i7) replaces colors of pixels
i1 - Red component of original color (integer from 0 to 255)
i2 - Green component of original color (integer from 0 to 255)
i3 - Blue component of original color (integer from 0 to 255)
i4 - Red component of replacement color (integer from 0 to 255)
i5 - Green component of replacement color (integer from 0 to 255)
i6 - Blue component of replacement color (integer from 0 to 255)
i7 - Tolerance value for the colors coincidence (integer from 0 to 100)
Replace_background(s1;i1;i2;i3;i4;i5) Replaces solid background with image
s1 - Full path to the replacement image file (string without quotation marks)
i1 = 1 the replacment image will not be stretched, and = 0 otherwise
i2 - Red component of background color (integer form 0 to 255)
i3 - Green component of background color (integer form 0 to 255)
i4 - Blue component of background color (integer form 0 to 255)
i5 - Tolerance value for background color coincidence (integer from 0 to 100)
Change_to_2(p1) Changes color resolution to 2 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_4(p1) Changes color resolution to 4 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_8(p1) Changes color resolution to 8 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_16(p1) Changes color resolution to 16 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_32(p1) Changes color resolution to 32 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_64(p1) Changes color resolution to 64 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_128(p1) Changes color resolution to 128 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_256(p1) Changes color resolution to 256 colors
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_true Changes color resolution to True colors (24 bit)
Change_to_gray(p1) Changes color resolution to Gray (8 bit)
For p1 = 1 will be used dithering
p1 = 2 will not be used dithering
Change_to_high Changes color resolution to High colors (16 bit)
Change_to_gray24 Changes color resolution to Gray (24 bit)
Change_to_negative Makes negative color transformation
This is an example of text script file:
Watermark(C:\NOT_REG.BMP;100;100;100)
Text_watermark(copy;50;50;90;Times New Roman;24;255;0;0;1;0;0;0;0)
Add_border(5;128;128;128;1;255;255;255;1)
Add_shadow(5;5;128;128;128;255;255;255)
Rotate(90;1;128;128;128)
Mirror(1)
Crop(10;10;10;10)
Resize(100;100;1)
HSV(0;0;0)
Smooth(0.75;50;1)
Blur(2.50;50)
Sharpen(0.75;50;1)
Detail(0.75;50;1)
Contour(1.00;100;1;1)
BCG(0;0.58;1.65;2)
RGB(30;0;0)
CMY(0;0;0)
YCbCr(0;0;0)
HLS(0;0;0)
Color_replace(128;128;128;128;128;128;5)
Replace_background(C:\test.bmp;0;255;255;255;15)
Change_to_2(1)
Change_to_4(1)
Change_to_8(1)
Change_to_16(1)
Change_to_32(1)
Change_to_64(1)
Change_to_128(1)
Change_to_256(1)
Change_to_true
Change_to_gray(1)
Change_to_high
Change_to_gray24
Change_to_negative
See also: